@svizzle/utils/any-[array-object]

Methods

(static) makeKeyed(value) → {function}

Source:
Since:
  • 0.3.0

Return a function expecting an array of keys and returning an object with the provided value as value of those keys.

Example
> makeKeyedEmptyArray = makeKeyed([])
> makeKeyedEmptyArray([1, 2])
{1: [], 2: []}
> makeKeyedEmptyArray(['a', 'b'])
{a: [], b: []}
Parameters:
Name Type Description
value *
Returns:

function - Array -> Object

Type
function